package cn.akwangl.concurrency.web.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * Spring 事件消费者
 *
 * @author 阿坤同学
 * @date 2025/2/14 09:31
 */
@Slf4j
@Component
public class EventConsumer implements ApplicationListener<SourceEvent> {

    @Override
    public void onApplicationEvent(SourceEvent sourceEvent) {
        log.info("接收来自Spring 事件，事件名称：【{}】", sourceEvent.getName());
    }
}
